package offer;


public class Offer58 {
    class Solution {
        public String reverseLeftWords(String s, int n) {
            //不合法入参
            if (n < 0) {
                return s;
            }

            int length = s.length();
            int offset = n % length;//避免超出字符串长度

            return s.substring(offset) + s.substring(0, offset);
        }
    }
}
